home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d996.lha / Startup-Menu / Source / ReqTools.pas < prev    next >
Pascal/Delphi Source File  |  1994-04-05  |  27KB  |  1,093 lines

  1.  
  2. {        ReqTools (V38) interface for HSPascal         }
  3. {                                                      }
  4. { ReqTools is (C) Copyright 1991/1992 by Nico François }
  5. {                                                      }
  6. {  HSPascal interface v1.2 © 1992 by Gunter Indenhoek  }
  7.  
  8. Unit ReqTools;
  9.  
  10. Interface
  11. Uses Exec,AmigaDOS,Intuition,Graphics,Init,Utility;
  12.  
  13. Const
  14.     
  15.     REQTOOLSNAME = 'reqtools.library';
  16.     REQTOOLSVERSION = 38;
  17.  
  18. Type
  19.  
  20. { for Dosnames like Dir, Fontnames, etc. }
  21.  
  22.     pString = ^tString;
  23.     tString = String;
  24.  
  25. { array to pass your arguments to EZRequestA() }
  26.  
  27.     argarray = array[0..31] of LongInt;
  28.  
  29. { array to pass your flags to reqtools-requesters }
  30.  
  31.     preqtaglist = ^treqtaglist;
  32.  
  33.     treqtaglist = array[0..32] of tTagItem;
  34.  
  35. { library - base }
  36.  
  37.     pReqToolsBase = ^tReqToolsBase;
  38.  
  39.     tReqToolsBase = 
  40.         Record
  41.             Lib_Node: pLibrary;
  42.             Flags: ShortInt;
  43.             Pad: Array[0..2] of ShortInt;
  44.             SegList: BPTR;
  45.             { The following library bases may be read and used by your program }
  46.             IntuitionBase: ^tIntuitionBase;
  47.             GfxBase: ^tGfxBase;
  48.             DOSBase: ^tDosLibrary;
  49.             { Next two library bases are only (and always) valid on Kickstart 2.0!
  50.               (1.3 version of reqtools also initializes these when run on 2.0) }
  51.             GadToolsBase: pLibrary;
  52.             UtilityBase: pLibrary;
  53.         end;
  54.  
  55. Const
  56.  
  57. { types of requesters, for rtAllocRequestA() }
  58.  
  59.     RT_FILEREQ = 0;
  60.     RT_REQINFO = 1;
  61.     RT_FONTREQ = 2;
  62.     { (V38) }
  63.     RT_SCREENMODEREQ = 3;
  64.  
  65. {***********************
  66. *                      *
  67. *    File requester    *
  68. *                      *
  69. ***********************}
  70.  
  71. type
  72.  
  73. { structure _MUST_ be allocated with rtAllocRequest() }
  74.  
  75.     prtFileRequester = ^trtFileRequester;
  76.  
  77.     trtFileRequester = Record
  78.         ReqPos: LongInt;
  79.         LeftOffset: Integer;
  80.         TopOffset: Integer;
  81.         Flags: LongInt;
  82.         { OBSOLETE IN V38! DON'T USE! } Hook: pHook;
  83.         Dir: pString;             { READ ONLY! Change with rtChangeReqAttrA()! }
  84.         MatchPat: pString;     { READ ONLY! Change with rtChangeReqAttrA()! }
  85.         DefaultFont: pTextFont;
  86.         WaitPointer: LongInt;
  87.         { (V38) }
  88.         LockWindow: LongInt;
  89.         ShareIDCMP: LongInt;
  90.         IntuiMsgFunc: pHook;
  91.         reserved1: Integer;
  92.         reserved2: Integer;
  93.         reserved3: Integer;
  94.         ReqHeight: Integer;        { READ ONLY! Use RTFI_Height tag! }
  95.         { Private data follows! HANDS OFF }
  96.     end;
  97.  
  98. { returned by rtFileRequestA() if multiselect is enabled,
  99.   free list with rtFreeFileList() }
  100.  
  101.     prtFileList = ^trtFileList;
  102.  
  103.     trtFileList = Record
  104.         Next: prtFileList;
  105.         StrLen: LongInt;        { -1 for directories }
  106.         Name: pString;
  107.     end;
  108.  
  109. {***********************
  110. *                      *
  111. *    Font requester    *
  112. *                      *
  113. ***********************}
  114.  
  115. { structure _MUST_ be allocated with rtAllocRequest() }
  116.  
  117.     prtFontRequester = ^trtFontRequester;
  118.  
  119.     trtFontRequester = Record
  120.         ReqPos: LongInt;
  121.         LeftOffset: Integer;
  122.         TopOffset: Integer;
  123.         Flags: LongInt;
  124.         { OBSOLETE IN V38! DON'T USE! } Hook: pHook;
  125.         Attr: tTextAttr; { READ ONLY! }
  126.         DefaultFont: pTextFont;
  127.         WaitPointer: LongInt;
  128.         { (V38) }
  129.         LockWindow: LongInt;
  130.         ShareIDCMP: LongInt;
  131.         IntuiMsgFunc: pHook;
  132.         reserved1: Integer;
  133.         reserved2: Integer;
  134.         reserved3: Integer;
  135.         ReqHeight: Integer; { READ ONLY!  Use RTFO_Height tag! }
  136.         { Private data follows! HANDS OFF }
  137.     end;
  138.  
  139. {*************************
  140. *                        *
  141. *  ScreenMode requester  *
  142. *                        *
  143. *************************}
  144.  
  145. { structure _MUST_ be allocated with rtAllocRequest() }
  146.  
  147.     prtScreenModeRequester = ^trtScreenModeRequester;
  148.  
  149.     trtScreenModeRequester = Record
  150.         ReqPos: LongInt;
  151.         LeftOffset: Integer;
  152.         TopOffset: Integer;
  153.         Flags: LongInt;
  154.         private1: LongInt;
  155.         DisplayID: LongInt;        { READ ONLY! }
  156.         DisplayWidth: Integer;    { READ ONLY! }
  157.         DisplayHeight: Integer;    { READ ONLY! }
  158.         DefaultFont: pTextFont;
  159.         WaitPointer: LongInt;
  160.         LockWindow: LongInt;
  161.         ShareIDCMP: LongInt;
  162.         IntuiMsgFunc: pHook;
  163.         reserved1: Integer;
  164.         reserved2: Integer;
  165.         reserved3: Integer;
  166.         ReqHeight: Integer;        { READ ONLY!  Use RTSC_Height tag! }
  167.         DisplayDepth: Integer;    { READ ONLY! }
  168.         OverscanType: Integer;    { READ ONLY! }
  169.         AutoScroll: LongInt;        { READ ONLY! }
  170.         { Private data follows! HANDS OFF }
  171.     end;
  172.  
  173. {***********************
  174. *                      *
  175. *    Requester Info    *
  176. *                      *
  177. ***********************}
  178.  
  179. { for rtEZRequestA(), rtGetLongA(), rtGetStringA() and rtPaletteRequestA(),
  180.    _MUST_ be allocated with rtAllocRequest() }
  181.  
  182.     prtReqInfo = ^ trtReqInfo;
  183.  
  184.     trtReqInfo = Record
  185.         ReqPos: LongInt;
  186.         LeftOffset: Integer;
  187.         TopOffset: Integer;
  188.         Width: LongInt;                { not for rtEZRequestA() }
  189.         ReqTitle: pString;            { currently only for rtEZRequestA() }
  190.         Flags: LongInt;                { currently only for rtEZRequestA() }
  191.         DefaultFont: pTextFont;        { currently only for rtPaletteRequestA() }
  192.         WaitPointer: LongInt;
  193.         { (V38) }
  194.         LockWindow: LongInt;
  195.         ShareIDCMP: LongInt;
  196.         IntuiMsgFunc: pHook;
  197.         { structure may be extended in future }
  198.     end;
  199.  
  200. {***********************
  201. *                      *
  202. *     Handler Info     *
  203. *                      *
  204. ***********************}
  205.  
  206. { for rtReqHandlerA(), will be allocated for you when you use
  207.    the RT_ReqHandler tag, never try to allocate this yourself! }
  208.  
  209.     prtHandlerInfo = ^trtHandlerInfo;
  210.  
  211.     trtHandlerInfo = Record
  212.         private1: LongInt;
  213.         WaitMask: LongInt;
  214.         DoNotWait: LongInt;
  215.        { Private data follows, HANDS OFF }
  216.     end;
  217.  
  218. Const
  219.  
  220. { possible return codes from rtReqHandlerA() }
  221.  
  222.     CALL_HANDLER = $80000000;
  223.  
  224. {*************************************
  225. *                                    *
  226. *                TAGS                *
  227. *                                    *
  228. *************************************}
  229.  
  230.     RT_TagBase = TAG_USER;
  231.  
  232. { *** tags understood by most requester functions *** }
  233. { Optional pointer to window }
  234.     RT_Window = $80000001;
  235. { idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED) }
  236.     RT_IDCMPFlags = $80000002;
  237. { position of requester window (see below) - default REQPOS_POINTER }
  238.     RT_ReqPos = $80000003;
  239. { signal mask to wait for abort signal }
  240.     RT_LeftOffset = $80000004;
  241. { topedge offset of requester relative to position specified by RT_ReqPos }
  242.     RT_TopOffset = $80000005;
  243. { name of public screen to put requester on (Kickstart 2.0 only!) }
  244.     RT_PubScrName = $80000006;
  245. { address of screen to put requester on }
  246.     RT_Screen = $80000007;
  247. { tagdata must hold the address of (!) an APTR variable }
  248.     RT_ReqHandler = $80000008;
  249. { font to use when screen font is rejected, _MUST_ be fixed-width font!
  250.    ( pTextFont , not pTextAttr )
  251.    - default GfxBase^.DefaultFont }
  252.     RT_DefaultFont = $80000009;
  253. { boolean to set the standard wait pointer in window - default FALSE }
  254.     RT_WaitPointer = $8000000A;
  255. { (V38) char preceding keyboard shortcut characters (will be underlined) }
  256.     RT_Underscore = $8000000B;
  257. { (V38) share IDCMP port with window - default FALSE }
  258.     RT_ShareIDCMP = $8000000C;
  259. { (V38) lock window and set standard wait pointer - default FALSE }
  260.     RT_LockWindow = $8000000D;
  261. { (V38) boolean to make requester's screen pop to front - default TRUE }
  262.     RT_ScreenToFront = $8000000E;
  263. { (V38) Requester should use this font - default: screen font }
  264.     RT_TextAttr = $8000000F;
  265. { (V38) call this hook for every IDCMP message not for requester }
  266.     RT_IntuiMsgFunc = $80000010;
  267. { (V38) Locale ReqTools should use for text }
  268.     RT_Locale = $80000011;
  269.  
  270. { *** tags specific to rtEZRequestA *** }
  271. { title of requester window - english default "Request" or "Information" }
  272.     RTEZ_ReqTitle = $80000014;
  273. { ($80000015) reserved }
  274. { various flags (see below) }
  275.     RTEZ_Flags = $80000016;
  276. { default response (activated by pressing RETURN) - default TRUE }
  277.     RTEZ_DefaultResponse = $80000017;
  278.  
  279. { *** tags specific to rtGetLongA *** }
  280. { minimum allowed value - default MININT }
  281.     RTGL_Min = $8000001E;
  282. { maximum allowed value - default MAXINT }
  283.     RTGL_Max = $8000001F;
  284. { suggested width of requester window (in pixels) }
  285.     RTGL_Width = $80000020;
  286. { boolean to show the default value - default TRUE }
  287.     RTGL_ShowDefault = $80000021;
  288. { (V38) string with possible responses - english default " _Ok |_Cancel" }
  289.     RTGL_GadFmt = $80000022;
  290. { (V38) optional arguments for RTGL_GadFmt }
  291.     RTGL_GadFmtArgs = $80000023;
  292. { (V38) invisible typing - default FALSE }
  293.     RTGL_Invisible = $80000024;
  294. { (V38) window backfill - default TRUE }
  295.     RTGL_BackFill = $80000025;
  296. { (V38) optional text above gadget }
  297.     RTGL_TextFmt = $80000026;
  298. { (V38) optional arguments for RTGS_TextFmt }
  299.     RTGL_TextFmtArgs = $80000027;
  300. { (V38) various flags (see below) }
  301.     RTGL_Flags = RTEZ_Flags;
  302.  
  303. { *** tags specific to rtGetStringA *** }
  304. { suggested width of requester window (in pixels) }
  305.     RTGS_Width = RTGL_Width;
  306. { allow empty string to be accepted - default FALSE }
  307.     RTGS_AllowEmpty = $80000050;
  308. { (V38) string with possible responses - english default " _Ok |_Cancel" }
  309.     RTGS_GadFmt = RTGL_GadFmt;
  310. { (V38) optional arguments for RTGS_GadFmt }
  311.     RTGS_GadFmtArgs = RTGL_GadFmtArgs;
  312. { (V38) invisible typing - default FALSE }
  313.     RTGS_Invisible = RTGL_Invisible;
  314. { (V38) window backfill - default TRUE }
  315.     RTGS_BackFill = RTGL_BackFill;
  316. { (V38) optional text above gadget }
  317.     RTGS_TextFmt = RTGL_TextFmt;
  318. { (V38) optional arguments for RTGS_TextFmt }
  319.     RTGS_TextFmtArgs = RTGL_TextFmtArgs;
  320. { (V38) various flags (see below) }
  321.     RTGS_Flags = RTEZ_Flags;
  322.  
  323. { *** tags specific to rtFileRequestA *** }
  324. { various flags (see below) }
  325.     RTFI_Flags = $80000028;
  326. { suggested height of file requester }
  327.     RTFI_Height = $80000029;
  328. { replacement text for 'Ok' gadget (max 6 chars) }
  329.     RTFI_OkText = $8000002A;
  330. { (V38) bring up volume requester, tag data holds flags (see below) }
  331.     RTFI_VolumeRequest = $8000002B;
  332. { (V38) call this hook for every file in the directory }
  333.     RTFI_FilterFunc = $8000002C;
  334. { (V38) allow empty file to be accepted - default FALSE }
  335.     RTFI_AllowEmpty = $8000002D;
  336.  
  337. { *** tags specific to rtFontRequestA *** }
  338. { various flags (see below) }
  339.     RTFO_Flags = RTFI_Flags;
  340. { suggested height of font requester }
  341.     RTFO_Height = RTFI_Height;
  342. { replacement text for 'Ok' gadget (max 6 chars) }
  343.     RTFO_OkText = RTFI_OkText;
  344. { suggested height of font sample display - default 24 }
  345.     RTFO_SampleHeight = $8000003C;
  346. { minimum height of font displayed }
  347.     RTFO_MinHeight = $8000003D;
  348. { maximum height of font displayed }
  349.     RTFO_MaxHeight = $8000003E;
  350. { [($8000003F) to ($80000042) used below] }
  351. { (V38) call this hook for every font }
  352.     RTFO_FilterFunc = RTFI_FilterFunc;
  353.  
  354. { *** (V38) tags for rtScreenModeRequestA *** }
  355. { various flags (see below) }
  356.     RTSC_Flags = RTFI_Flags;
  357. { suggested height of screenmode requester }
  358.     RTSC_Height = RTFI_Height;
  359. { replacement text for 'Ok' gadget (max 6 chars) }
  360.     RTSC_OkText = RTFI_OkText;
  361. { property flags (see also RTSC_PropertyMask) }
  362.     RTSC_PropertyFlags = $8000005A;
  363. { property mask - default all bits in RTSC_PropertyFlags considered }
  364.     RTSC_PropertyMask = $8000005B;
  365. { minimum display width allowed }
  366.     RTSC_MinWidth = $8000005C;
  367. { maximum display width allowed }
  368.     RTSC_MaxWidth = $8000005D;
  369. { minimum display height allowed }
  370.     RTSC_MinHeight = $8000005E;
  371. { maximum display height allowed }
  372.     RTSC_MaxHeight = $8000005F;
  373. { minimum display depth allowed }
  374.     RTSC_MinDepth = $80000060;
  375. { maximum display depth allowed }
  376.     RTSC_MaxDepth = $80000061;
  377. { call this hook for every display mode id }
  378.     RTSC_FilterFunc = RTFI_FilterFunc;
  379.  
  380. { *** tags for rtChangeReqAttrA *** }
  381. { file requester - set directory }
  382.     RTFI_Dir = $80000032;
  383. { file requester - set wildcard pattern }
  384.     RTFI_MatchPat = $80000033;
  385. { file requester - add a file or directory to the buffer }
  386.     RTFI_AddEntry = $80000034;
  387. { file requester - remove a file or directory from the buffer }
  388.     RTFI_RemoveEntry = $80000035;
  389. { font requester - set font name of selected font }
  390.     RTFO_FontName = $8000003F;
  391. { font requester - set font size }
  392.     RTFO_FontHeight = $80000040;
  393. { font requester - set font style }
  394.     RTFO_FontStyle = $80000041;
  395. { font requester - set font flags }
  396.     RTFO_FontFlags = $80000042;
  397. { (V38) screenmode requester - get display attributes from screen }
  398.     RTSC_ModeFromScreen = $80000050;
  399. { (V38) screenmode requester - set display mode id (32-bit extended) }
  400.     RTSC_DisplayID = $80000051;
  401. { (V38) screenmode requester - set display width }
  402.     RTSC_DisplayWidth = $80000052;
  403. { (V38) screenmode requester - set display height }
  404.     RTSC_DisplayHeight = $80000053;
  405. { (V38) screenmode requester - set display depth }
  406.     RTSC_DisplayDepth = $80000054;
  407. { (V38) screenmode requester - set overscan type, 0 for regular size }
  408.     RTSC_OverscanType = $80000055;
  409. { (V38) screenmode requester - set autoscroll }
  410.     RTSC_AutoScroll = $80000056;
  411.  
  412.  
  413. { *** tags for rtPaletteRequestA *** }
  414. { initially selected color - default 1 }
  415.     RTPA_Color = $80000046;
  416.  
  417. { *** tags for rtReqHandlerA *** }
  418. { end requester by software control, set tagdata to REQ_CANCEL, REQ_OK or
  419.   in case of rtEZRequest to the return value }
  420.     RTRH_EndRequest = $800003C;
  421.  
  422. { *** tags for rtAllocRequestA *** }
  423. { no tags defined yet }
  424.  
  425. {************
  426. * RT_ReqPos *
  427. ************}
  428.     REQPOS_POINTER = 0;
  429.     REQPOS_CENTERWIN = 1;
  430.     REQPOS_CENTERSCR = 2;
  431.     REQPOS_TOPLEFTWIN = 3;
  432.     REQPOS_TOPLEFTSCR = 4;
  433.     
  434. {******************
  435. * RTRH_EndRequest *
  436. ******************}
  437.     REQ_CANCEL = 0;
  438.     REQ_OK = 1;
  439.  
  440. {***************************************
  441. * flags for RTFI_Flags and RTFO_Flags  *
  442. * or filereq->Flags and fontreq->Flags *
  443. ***************************************}
  444.     FREQB_NOBUFFER = 2;
  445.     FREQF_NOBUFFER = 4;
  446.  
  447. {*****************************************
  448. * flags for RTFI_Flags or filereq->Flags *
  449. *****************************************}
  450.     FREQB_MULTISELECT = 0;
  451.     FREQF_MULTISELECT = 1;
  452.     FREQB_SAVE = 1;
  453.     FREQF_SAVE = 2;
  454.     FREQB_NOFILES = 3;
  455.     FREQF_NOFILES = 8;
  456.     FREQB_PATGAD = 4;
  457.     FREQF_PATGAD = 16;
  458.     FREQB_SELECTDIRS = 12;
  459.     FREQF_SELECTDIRS = 4096;
  460.  
  461. {*****************************************
  462. * flags for RTFO_Flags or fontreq->Flags *
  463. *****************************************}
  464.     FREQB_FIXEDWIDTH = 5;
  465.     FREQF_FIXEDWIDTH = 32;
  466.     FREQB_COLORFONTS = 6;
  467.     FREQF_COLORFONTS = 64;
  468.     FREQB_CHANGEPALETTE = 7;
  469.     FREQF_CHANGEPALETTE = 128;
  470.     FREQB_LEAVEPALETTE = 8;
  471.     FREQF_LEAVEPALETTE = 256;
  472.     FREQB_SCALE = 9;
  473.     FREQF_SCALE = 512;
  474.     FREQB_STYLE = 10;
  475.     FREQF_STYLE = 1024;
  476.  
  477. {*****************************************************
  478. * (V38) flags for RTSC_Flags or screenmodereq->Flags *
  479. *****************************************************}
  480.     SCREQB_SIZEGADS = 13;
  481.     SCREQF_SIZEGADS = 8192;
  482.     SCREQB_DEPTHGAD = 14;
  483.     SCREQF_DEPTHGAD = 16384;
  484.     SCREQB_NONSTDMODES = 15;
  485.     SCREQF_NONSTDMODES = 32768;
  486.     SCREQB_GUIMODES = 16;
  487.     SCREQF_GUIMODES = 65536;
  488.     SCREQB_AUTOSCROLLGAD = 18;
  489.     SCREQF_AUTOSCROLLGAD = 262144;
  490.     SCREQB_OVERSCANGAD = 19;
  491.     SCREQF_OVERSCANGAD = 524288;
  492.  
  493. {*****************************************
  494. * flags for RTEZ_Flags or reqinfo->Flags *
  495. *****************************************}
  496.     EZREQB_NORETURNKEY = 0;
  497.     EZREQF_NORETURNKEY = 1;
  498.     EZREQB_LAMIGAQUAL = 1;
  499.     EZREQF_LAMIGAQUAL = 2;
  500.     EZREQB_CENTERTEXT = 2;
  501.     EZREQF_CENTERTEXT = 4;
  502.  
  503. {***********************************************
  504. * (V38) flags for RTGL_Flags or reqinfo->Flags *
  505. ***********************************************}
  506.     GLREQB_CENTERTEXT = EZREQB_CENTERTEXT;
  507.     GLREQF_CENTERTEXT = EZREQF_CENTERTEXT;
  508.     GLREQB_HIGHLIGHTTEXT = 3;
  509.     GLREQF_HIGHLIGHTTEXT = 8;
  510.  
  511. {***********************************************
  512. * (V38) flags for RTGS_Flags or reqinfo->Flags *
  513. ***********************************************}
  514.     GSREQB_CENTERTEXT = EZREQB_CENTERTEXT;
  515.     GSREQF_CENTERTEXT = EZREQF_CENTERTEXT;
  516.     GSREQB_HIGHLIGHTTEXT = GLREQB_HIGHLIGHTTEXT;
  517.     GSREQF_HIGHLIGHTTEXT = GLREQF_HIGHLIGHTTEXT;
  518.  
  519. {*****************************************
  520. * (V38) flags for RTFI_VolumeRequest tag *
  521. *****************************************}
  522.     VREQB_NOASSIGNS=0;
  523.     VREQF_NOASSIGNS=1;
  524.     VREQB_NODISKS=1;
  525.     VREQF_NODISKS=2;
  526.     VREQB_ALLDISKS=2;
  527.     VREQF_ALLDISKS=4;
  528.  
  529. {*
  530.    Following things are obsolete in ReqTools V38.
  531.    DON'T USE THESE IN NEW CODE!
  532. *}
  533.     REQHOOK_WILDFILE=0;
  534.     REQHOOK_WILDFONT=1;
  535.     FREQB_DOWILDFUNC=11;
  536.     FREQF_DOWILDFUNC=2048;
  537.  
  538.  
  539. {************
  540. * Functions *
  541. ************}
  542.  
  543. Function rtAllocRequestA
  544.          (type_: LongInt;
  545.           taglist: preqtaglist): LongInt;
  546.  
  547. Function rtFreeRequest (req: Pointer): LongInt;
  548. Function rtFreeReqBuffer (req: Pointer): LongInt;
  549. Function rtChangeReqAttrA
  550.          (req: Pointer;
  551.           taglist: preqtaglist): LongInt;
  552.  
  553. Function rtFileRequestA
  554.          (filereq: prtFileRequester;
  555.           file_: pString;
  556.           title: String;
  557.           taglist: preqtaglist): LongInt;
  558.  
  559. Function rtFreeFileList (filelist: prtFileList): LongInt;
  560. Function rtEZRequestA
  561.          (bodyfmt:String;
  562.           gadfmt:String;
  563.           reqinfo: prtReqInfo;
  564.           argarray:Pointer;
  565.           taglist: preqtaglist): LongInt;
  566.  
  567. Function rtGetStringA
  568.          (buffer: Pointer;
  569.           maxchars: LongInt;
  570.           title: String;
  571.           reqinfo:prtReqInfo;
  572.           taglist: preqtaglist): LongInt;
  573.  
  574. Function rtGetLongA
  575.          (longptr: Pointer;
  576.           title: String;
  577.           reqinfo:prtReqInfo;
  578.           taglist: preqtaglist): LongInt;
  579.  
  580. Function rtFontRequestA
  581.          (fontreq:prtFontRequester;
  582.           title: String;
  583.           taglist: preqtaglist): LongInt;
  584.  
  585. Function rtPaletteRequestA
  586.          (title: String;
  587.           reqinfo:prtReqInfo;
  588.           taglist: preqtaglist): LongInt;
  589.  
  590. Function rtReqHandlerA
  591.          (handlerinfo: prtHandlerInfo;
  592.           sigs: LongInt;
  593.           taglist: preqtaglist): LongInt;
  594.  
  595. Function rtSetWaitPointer (window: pWindow): LongInt;
  596. Function rtGetVScreenSize
  597.          (screen:pScreen;
  598.           widthptr,
  599.           heightptr: Pointer): LongInt;
  600.  
  601. Function rtSetReqPosition
  602.          (reqpos: LongInt;
  603.           newwindow:pNewWindow;
  604.           screen:pScreen;
  605.           window: pWindow): LongInt;
  606.  
  607. Function rtSpread
  608.          (posarray,
  609.           sizearray: Pointer;
  610.           length,
  611.           min,
  612.           max,
  613.           num: LongInt): LongInt;
  614.  
  615. Function rtScreenToFrontSafely (screen: pScreen): LongInt;
  616. Function rtScreenModeRequestA
  617.          (screenmodereq:prtScreenModeRequester;
  618.           title: String;
  619.           taglist: preqtaglist): LongInt;
  620.  
  621. Function rtCloseWindowSafely (win: pWindow): LongInt;
  622. Function rtLockWindow (win: pWindow): LongInt;
  623. Function rtUnlockWindow
  624.          (win:pWindow;
  625.           winlock: Pointer): LongInt;
  626.  
  627. Var
  628.   ReqToolsBase: pReqToolsBase;
  629.  
  630. Implementation
  631.  
  632. Function AllocRequestA
  633.          (type_: LongInt;
  634.           taglist: preqtaglist): LongInt;
  635. XASSEMBLER;
  636. ASM    move.l    a6,-(sp)
  637.     lea    $8(sp),a6
  638.     move.l    (a6)+,a0
  639.     move.l    (a6)+,d0
  640.     move.l    ReqToolsBase,a6
  641.     jsr    -$1E(a6)
  642.     move.l    d0,$10(sp)
  643.     move.l    (sp)+,a6
  644. END;
  645.  
  646. Function FreeRequest (req: Pointer): LongInt;
  647. XASSEMBLER;
  648. ASM    move.l    a6,-(sp)
  649.     move.l    $8(sp),a1
  650.     move.l    ReqToolsBase,a6
  651.     jsr    -$24(a6)
  652.     move.l    d0,$C(sp)
  653.     move.l    (sp)+,a6
  654. END;
  655.  
  656. Function FreeReqBuffer (req: Pointer): LongInt;
  657. XASSEMBLER;
  658. ASM    move.l    a6,-(sp)
  659.     move.l    $8(sp),a1
  660.     move.l    ReqToolsBase,a6
  661.     jsr    -$2A(a6)
  662.     move.l    d0,$C(sp)
  663.     move.l    (sp)+,a6
  664. END;
  665.  
  666. Function ChangeReqAttrA
  667.          (req: Pointer;
  668.           taglist: preqtaglist): LongInt;
  669. XASSEMBLER;
  670. ASM    move.l    a6,-(sp)
  671.     movem.l    $8(sp),a0-a1
  672.     move.l    ReqToolsBase,a6
  673.     jsr    -$30(a6)
  674.     move.l    d0,$10(sp)
  675.     move.l    (sp)+,a6
  676. END;
  677.  
  678. Function FileRequestA
  679.          (filereq:prtFileRequester;
  680.           file_: Pointer;
  681.           title: Pointer;
  682.           taglist: preqtaglist): LongInt;
  683. XASSEMBLER;
  684. ASM    movem.l    a2-a3/a6,-(sp)
  685.     lea    $10(sp),a6
  686.     move.l    (a6)+,a0
  687.     move.l    (a6)+,a3
  688.     move.l    (a6)+,a2
  689.     move.l    (a6)+,a1
  690.     move.l    ReqToolsBase,a6
  691.     jsr    -$36(a6)
  692.     move.l    d0,$20(sp)
  693.     movem.l    (sp)+,a2-a3/a6
  694. END;
  695.  
  696. Function FreeFileList (filelist: prtFileList): LongInt;
  697. XASSEMBLER;
  698. ASM    move.l    a6,-(sp)
  699.     move.l    $8(sp),a0
  700.     move.l    ReqToolsBase,a6
  701.     jsr    -$3C(a6)
  702.     move.l    d0,$C(sp)
  703.     move.l    (sp)+,a6
  704. END;
  705.  
  706. Function EZRequestA
  707.          (bodyfmt:Pointer;
  708.           gadfmt: Pointer;
  709.           reqinfo: prtReqInfo;
  710.           argarray: Pointer;
  711.           taglist: preqtaglist): LongInt;
  712. XASSEMBLER;
  713. ASM    movem.l    a2-a4/a6,-(sp)
  714.     lea    $14(sp),a6
  715.     move.l    (a6)+,a0
  716.     move.l    (a6)+,a4
  717.     move.l    (a6)+,a3
  718.     move.l    (a6)+,a2
  719.     move.l    (a6)+,a1
  720.     move.l    ReqToolsBase,a6
  721.     jsr    -$42(a6)
  722.     move.l    d0,$28(sp)
  723.     movem.l    (sp)+,a2-a4/a6
  724. END;
  725.  
  726. Function GetStringA
  727.          (buffer: Pointer;
  728.           maxchars: LongInt;
  729.           title: Pointer;
  730.           reqinfo: prtReqInfo;
  731.           taglist: preqtaglist): LongInt;
  732. XASSEMBLER;
  733. ASM    movem.l    a2-a3/a6,-(sp)
  734.     lea    $10(sp),a6
  735.     move.l    (a6)+,a0
  736.     move.l    (a6)+,a3
  737.     move.l    (a6)+,a2
  738.     move.l    (a6)+,d0
  739.     move.l    (a6)+,a1
  740.     move.l    ReqToolsBase,a6
  741.     jsr    -$48(a6)
  742.     move.l    d0,$24(sp)
  743.     movem.l    (sp)+,a2-a3/a6
  744. END;
  745.  
  746. Function GetLongA
  747.          (longptr:Pointer;
  748.           title:Pointer;
  749.           reqinfo:prtReqInfo;
  750.           taglist: preqtaglist): LongInt;
  751. XASSEMBLER;
  752. ASM    movem.l    a2-a3/a6,-(sp)
  753.     lea    $10(sp),a6
  754.     move.l    (a6)+,a0
  755.     move.l    (a6)+,a3
  756.     move.l    (a6)+,a2
  757.     move.l    (a6)+,a1
  758.     move.l    ReqToolsBase,a6
  759.     jsr    -$4E(a6)
  760.     move.l    d0,$20(sp)
  761.     movem.l    (sp)+,a2-a3/a6
  762. END;
  763.  
  764. Function FontRequestA
  765.          (fontreq:prtFontRequester;
  766.           title: Pointer;
  767.           taglist: preqtaglist): LongInt;
  768. XASSEMBLER;
  769. ASM    movem.l    a3/a6,-(sp)
  770.     lea    $C(sp),a6
  771.     move.l    (a6)+,a0
  772.     move.l    (a6)+,a3
  773.     move.l    (a6)+,a1
  774.     move.l    ReqToolsBase,a6
  775.     jsr    -$60(a6)
  776.     move.l    d0,$18(sp)
  777.     movem.l    (sp)+,a3/a6
  778. END;
  779.  
  780. Function PaletteRequestA
  781.          (title:Pointer;
  782.           reqinfo: prtReqInfo;
  783.           taglist: preqtaglist): LongInt;
  784. XASSEMBLER;
  785. ASM    movem.l    a2-a3/a6,-(sp)
  786.     lea    $10(sp),a6
  787.     move.l    (a6)+,a0
  788.     move.l    (a6)+,a3
  789.     move.l    (a6)+,a2
  790.     move.l    ReqToolsBase,a6
  791.     jsr    -$66(a6)
  792.     move.l    d0,$1C(sp)
  793.     movem.l    (sp)+,a2-a3/a6
  794. END;
  795.  
  796. Function ReqHandlerA
  797.          (handlerinfo: prtHandlerInfo;
  798.           sigs: LongInt;
  799.           taglist: preqtaglist): LongInt;
  800. XASSEMBLER;
  801. ASM    move.l    a6,-(sp)
  802.     lea    $8(sp),a6
  803.     move.l    (a6)+,a0
  804.     move.l    (a6)+,d0
  805.     move.l    (a6)+,a1
  806.     move.l    ReqToolsBase,a6
  807.     jsr    -$6C(a6)
  808.     move.l    d0,$14(sp)
  809.     move.l    (sp)+,a6
  810. END;
  811.  
  812. Function SetWaitPointer (window: pWindow): LongInt;
  813. XASSEMBLER;
  814. ASM    move.l    a6,-(sp)
  815.     move.l    $8(sp),a0
  816.     move.l    ReqToolsBase,a6
  817.     jsr    -$72(a6)
  818.     move.l    d0,$C(sp)
  819.     move.l    (sp)+,a6
  820. END;
  821.  
  822. Function GetVScreenSize
  823.          (screen: pScreen;
  824.           widthptr,
  825.           heightptr: Pointer): LongInt;
  826. XASSEMBLER;
  827. ASM    movem.l    a2/a6,-(sp)
  828.     lea    $C(sp),a6
  829.     move.l    (a6)+,a2
  830.     move.l    (a6)+,a1
  831.     move.l    (a6)+,a0
  832.     move.l    ReqToolsBase,a6
  833.     jsr    -$78(a6)
  834.     move.l    d0,$18(sp)
  835.     movem.l    (sp)+,a2/a6
  836. END;
  837.  
  838. Function SetReqPosition
  839.          (reqpos: LongInt;
  840.           newwindow: pNewWindow;
  841.           screen: pScreen;
  842.           window: pWindow): LongInt;
  843. XASSEMBLER;
  844. ASM    movem.l    a2/a6,-(sp)
  845.     lea    $C(sp),a6
  846.     move.l    (a6)+,a2
  847.     move.l    (a6)+,a1
  848.     move.l    (a6)+,a0
  849.     move.l    (a6)+,d0
  850.     move.l    ReqToolsBase,a6
  851.     jsr    -$7E(a6)
  852.     move.l    d0,$1C(sp)
  853.     movem.l    (sp)+,a2/a6
  854. END;
  855.  
  856. Function Spread
  857.          (posarray,
  858.           sizearray: Pointer;
  859.           length,
  860.           min,
  861.           max,
  862.           num: LongInt): LongInt;
  863. XASSEMBLER;
  864. ASM    movem.l    d3/a6,-(sp)
  865.     lea    $C(sp),a6
  866.     move.l    (a6)+,d3
  867.     move.l    (a6)+,d2
  868.     move.l    (a6)+,d1
  869.     move.l    (a6)+,d0
  870.     move.l    (a6)+,a1
  871.     move.l    (a6)+,a0
  872.     move.l    ReqToolsBase,a6
  873.     jsr    -$84(a6)
  874.     move.l    d0,$24(sp)
  875.     movem.l    (sp)+,d3/a6
  876. END;
  877.  
  878. Function ScreenToFrontSafely (screen: pScreen): LongInt;
  879. XASSEMBLER;
  880. ASM    move.l    a6,-(sp)
  881.     move.l    $8(sp),a0
  882.     move.l    ReqToolsBase,a6
  883.     jsr    -$8A(a6)
  884.     move.l    d0,$C(sp)
  885.     move.l    (sp)+,a6
  886. END;
  887.  
  888. Function ScreenModeRequestA
  889.          (screenmodereq: prtScreenModeRequester;
  890.           title: Pointer;
  891.           taglist: preqtaglist): LongInt;
  892. XASSEMBLER;
  893. ASM    movem.l    a3/a6,-(sp)
  894.     lea    $C(sp),a6
  895.     move.l    (a6)+,a0
  896.     move.l    (a6)+,a3
  897.     move.l    (a6)+,a1
  898.     move.l    ReqToolsBase,a6
  899.     jsr    -$90(a6)
  900.     move.l    d0,$18(sp)
  901.     movem.l    (sp)+,a3/a6
  902. END;
  903.  
  904. Function CloseWindowSafely (win: pWindow): LongInt;
  905. XASSEMBLER;
  906. ASM    move.l    a6,-(sp)
  907.     move.l    $8(sp),a0
  908.     move.l    ReqToolsBase,a6
  909.     jsr    -$96(a6)
  910.     move.l    d0,$C(sp)
  911.     move.l    (sp)+,a6
  912. END;
  913.  
  914. Function LockWindow (win: pWindow): LongInt;
  915. XASSEMBLER;
  916. ASM    move.l    a6,-(sp)
  917.     move.l    $8(sp),a0
  918.     move.l    ReqToolsBase,a6
  919.     jsr    -$9C(a6)
  920.     move.l    d0,$C(sp)
  921.     move.l    (sp)+,a6
  922. END;
  923.  
  924. Function UnlockWindow
  925.          (win: pWindow;
  926.           winlock: Pointer): LongInt;
  927. XASSEMBLER;
  928. ASM    move.l    a6,-(sp)
  929.     lea    $8(sp),a6    
  930.     move.l    (a6)+,a1
  931.     move.l    (a6)+,a0
  932.     move.l    ReqToolsBase,a6
  933.     jsr    -$A2(a6)
  934.     move.l    d0,$10(sp)
  935.     move.l    (sp)+,a6
  936. END;
  937.  
  938. Function rtAllocRequestA
  939.          (type_: LongInt;
  940.           taglist: preqtaglist): LongInt;
  941. BEGIN
  942.  rtAllocRequestA:=AllocRequestA(type_,taglist);
  943. END;
  944.  
  945. Function rtFreeRequest (req: Pointer): LongInt;
  946. BEGIN
  947.  rtFreeRequest:=FreeRequest(req);
  948. END;
  949.  
  950. Function rtFreeReqBuffer (req: Pointer): LongInt;
  951. BEGIN
  952.  rtFreeReqBuffer:=FreeReqBuffer(req);
  953. END;
  954.  
  955. Function rtChangeReqAttrA
  956.          (req: Pointer;
  957.           taglist: preqtaglist): LongInt;
  958. BEGIN
  959.  rtChangeReqAttrA:=ChangeReqAttrA(req,taglist);
  960. END;
  961.  
  962. Function rtFileRequestA
  963.          (filereq: prtFileRequester;
  964.           file_: pString;
  965.           title: String;
  966.           taglist: preqtaglist): LongInt;
  967. BEGIN
  968.  rtFileRequestA:=FileRequestA(filereq,file_,CstrConstPtr(title),taglist);
  969. END;
  970.  
  971. Function rtFreeFileList (filelist: prtFileList): LongInt;
  972. BEGIN
  973.  rtFreeFileList:=FreeFileList(filelist);
  974. END;
  975.  
  976. Function rtEZRequestA
  977.          (bodyfmt:String;
  978.           gadfmt:String;
  979.           reqinfo: prtReqInfo;
  980.           argarray:preqtaglist; { voorlopige oplossing }
  981.           taglist: preqtaglist): LongInt;
  982. BEGIN
  983.  rtEZRequestA:=EZRequestA(CstrConstPtr(bodyfmt),CstrConstPtr(gadfmt),reqinfo,argarray,taglist);
  984. END;
  985.  
  986. Function rtGetStringA
  987.          (buffer: Pointer;
  988.           maxchars: LongInt;
  989.           title: String;
  990.           reqinfo:prtReqInfo;
  991.           taglist: preqtaglist): LongInt;
  992. BEGIN
  993.  rtGetStringA:=GetStringA(buffer,maxchars,CstrConstPtr(title),reqinfo,taglist);
  994. END;
  995.  
  996. Function rtGetLongA
  997.          (longptr: Pointer;
  998.           title: String;
  999.           reqinfo:prtReqInfo;
  1000.           taglist: preqtaglist): LongInt;
  1001. BEGIN
  1002.   rtGetLongA:=GetLongA(longptr,CstrConstPtr(title),reqinfo,taglist);
  1003. END;
  1004.  
  1005. Function rtFontRequestA
  1006.          (fontreq:prtFontRequester;
  1007.           title: String;
  1008.           taglist: preqtaglist): LongInt;
  1009. BEGIN
  1010.  rtFontRequestA:=FontRequestA(fontreq,CstrConstPtr(title),taglist);
  1011. END;
  1012.  
  1013. Function rtPaletteRequestA
  1014.          (title: String;
  1015.           reqinfo:prtReqInfo;
  1016.           taglist: preqtaglist): LongInt;
  1017. BEGIN
  1018.  rtPaletteRequestA:=PaletteRequestA(CstrConstPtr(title),reqinfo,taglist);
  1019. END;
  1020.  
  1021. Function rtReqHandlerA
  1022.          (handlerinfo: prtHandlerInfo;
  1023.           sigs: LongInt;
  1024.           taglist: preqtaglist): LongInt;
  1025. BEGIN
  1026.  rtReqHandlerA:=ReqHandlerA(handlerinfo,sigs,taglist);
  1027. END;
  1028.  
  1029. Function rtSetWaitPointer (window: pWindow): LongInt;
  1030. BEGIN
  1031.  rtSetWaitPointer:=rtSetWaitPointer(window);
  1032. END;
  1033.  
  1034. Function rtGetVScreenSize
  1035.          (screen:pScreen;
  1036.           widthptr,
  1037.           heightptr: Pointer): LongInt;
  1038. BEGIN
  1039.  rtGetVScreenSize:=GetVScreenSize(screen,widthptr,heightptr);
  1040. END;
  1041.  
  1042. Function rtSetReqPosition
  1043.          (reqpos: LongInt;
  1044.           newwindow:pNewWindow;
  1045.           screen:pScreen;
  1046.           window: pWindow): LongInt;
  1047. BEGIN
  1048.  rtSetReqPosition:=SetReqPosition(reqpos,newwindow,screen,window);
  1049. END;
  1050.  
  1051. Function rtSpread
  1052.          (posarray,
  1053.           sizearray: Pointer;
  1054.           length,
  1055.           min,
  1056.           max,
  1057.           num: LongInt): LongInt;
  1058. BEGIN
  1059.  rtSpread:=Spread(posarray,sizearray,length,min,max,num);
  1060. END;
  1061.  
  1062. Function rtScreenToFrontSafely (screen: pScreen): LongInt;
  1063. BEGIN
  1064.  rtScreenToFrontSafely:=ScreenToFrontSafely(screen);
  1065. END;
  1066.  
  1067. Function rtScreenModeRequestA
  1068.          (screenmodereq:prtScreenModeRequester;
  1069.           title: String;
  1070.           taglist: preqtaglist): LongInt;
  1071. BEGIN
  1072.  rtScreenModeRequestA:=ScreenModeRequestA(screenmodereq,CstrConstPtr(title),taglist);
  1073. END;
  1074.  
  1075. Function rtCloseWindowSafely (win: pWindow): LongInt;
  1076. BEGIN
  1077.  rtCloseWindowSafely:=CloseWindowSafely(win);
  1078. END;
  1079.  
  1080. Function rtLockWindow (win: pWindow): LongInt;
  1081. BEGIN
  1082.  rtLockWindow:=LockWindow(win);
  1083. END;
  1084.  
  1085. Function rtUnlockWindow
  1086.          (win:pWindow;
  1087.           winlock: Pointer): LongInt;
  1088. BEGIN
  1089.  rtUnlockWindow:=UnlockWindow(win,winlock);
  1090. END;
  1091.  
  1092. End.
  1093.